package com.example.ss12.childtracker;

import java.util.ArrayList;
import java.util.List;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.protocol.HTTP;

import android.app.Activity;
import android.location.Location;
import android.location.LocationManager;
import android.os.AsyncTask;

public class ShowLocation extends Activity {
	double lat = 0.0;
	double lng = 0.0;
	LocationManager locationManager;
	
	public ShowLocation(LocationManager locationManager){
		this.locationManager = locationManager;
	}
	
	public LocationPostData upLoadLocation() {
		Location location = locationManager
					.getLastKnownLocation(LocationManager.GPS_PROVIDER);
		if (location != null) {
			lat = location.getLatitude();
			lng = location.getLongitude();
		}

		LocationPostData returnLoc = new LocationPostData("http://childtracker-ss12.appspot.com/sign", lng , lat);
		return returnLoc;
	}

	


}